package com.cizzy.relation.service;

import com.cizzy.relation.common.Result;
import com.cizzy.relation.entity.dto.UserDTO;
import com.cizzy.relation.entity.Relation;
import com.baomidou.mybatisplus.extension.service.IService;
import com.cizzy.relation.entity.vo.FollowRequest;

import javax.management.relation.RelationServiceNotRegisteredException;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author crissy-月下闲人
 * @since 2023-11-03
 */
public interface IRelationService extends IService<Relation> {

    Result<String> toConcern(Long id);

    Result<List<Long>> getTargetIds(Long userId);

    Result<List<UserDTO>> getTargetUsers(Long userId);

    Result<List<UserDTO>> getFans(Long userId);

    Result<Relation> createFollow(FollowRequest followRequest);

    Result<Relation> cancelFollow(FollowRequest followRequest);

    Result<Boolean> isFollowed(Long userId, Long targetId);

    Result<List<UserDTO>> getFollowById(Long userId);

    Result<List<UserDTO>> getFollowPageById(Long userId, Integer page, Integer pageSize);

    Result<List<UserDTO>> getFollowerById(Long userId);

    Result<List<UserDTO>> getFollowerPageById(Long targetId, Integer page, Integer pageSize);
}
